//package com.hncj.yqfk.filter;
//
//import javax.servlet.*;
//import javax.servlet.annotation.WebFilter;
//import javax.servlet.annotation.WebServlet;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import javax.servlet.http.HttpSession;
//import java.io.IOException;
//@WebFilter(filterName = "login1",urlPatterns = "/login.html")
//public class LoginF implements Filter {
//    @Override
//    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
//        HttpServletRequest request1=(HttpServletRequest) request;
//        HttpServletResponse response1=(HttpServletResponse) response;
//        HttpSession session =request1.getSession();
//        String name=(String) session.getAttribute("name");
//        if (name == null){
//            response1.sendRedirect("/login/index.html");
//        }
//        else {
//            chain.doFilter(request,response);
//        }
//    }
//}
